Fix hyphen html comment syntax highlight overflow#116
Fix hyphen html comment syntax highlight overflow#116wmcmurray wants to merge 2 commits intohedefalk:masterfrom
Conversation
|
While from my personal understanding of the spec you linked would say be Although, realistically, HTML is a very non-strict standard, where most browsers make a best effort to accept all HTML, even if invalid. Resulting in many pages online being technically invalid, but still achieving the results intended. With all of that said, thanks a ton for contributing! I know it's taken some time to getting this PR reviewed, and I've since pushed some updates that do automatic testing, to see how this PR behaves. But I'll go ahead and as soon as I can provide a review on the content of your code as well. Appreciate your time! |

Currently, when an html comment like this one is used:
<!---------- Sample Comment ----------->(no spaces between the hyphens forming the line and those forming the comment delimiter), everything under it will be grayed.I looked at HTML's comments RFC specs to verify if a comment like this is illegal or not, but it seems good to me, so I copied the same value used in language-html to make sure it's consistent, and it fixed the issue.
Also fun fact, Github's syntax highlight also seem to suffer this same problem ! 🤔 🤯 !
Here is an HTML syntax highlight: 👍🏼
and here is a Vue syntax highlight: 👎🏼